/**
 * 〈所属模块〉
 * 〈功能描述〉
 *
 * @author Lcs
 * @date 2017/9/15 13:27
 */

import React, { Component } from "react";
import {
  StyleSheet, Text, TextInput, View, Button,
} from "react-native";

import {
  Color, ScreenWidth, FontSize, scale,
} from "../common";
import NavigatorUtil from "../utils/NavigatorUtil";
import StorageUtil from "../utils/StorageUtil";

export default class Login extends Component {
  postLogin = () => {
    StorageUtil.saveUser({});
  };

  render() {
    return (
      <View style={styles.container}>
        <Text>aaaaaaa</Text>
        <Button title="登录" onPress={this.postLogin} />
      </View>
    );
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: Color.black,
  },
  description: {
    marginHorizontal: 16 * scale,
    marginVertical: 24 * scale,
    fontSize: 24 * scale,
    color: Color.text_title,
    fontWeight: "bold",
  },
  inputContainer: {
    flexDirection: "row",
    marginHorizontal: 16 * scale,
    justifyContent: "space-between",
  },
  input: {
    flex: 1,
    fontSize: FontSize.SIZE_17,
    color: Color.text_title,
    paddingVertical: 14 * scale,
  },
  codeButton: {
    borderWidth: 0,
  },
  codeButtonText: {
    fontSize: FontSize.SIZE_14,
    color: Color.colorPrimary,
  },
  buttonText: {
    fontSize: FontSize.SIZE_17,
    color: Color.white,
  },
  button: {
    height: 44 * scale,
    width: ScreenWidth - 32 * scale,
    marginTop: 24 * scale,
    marginHorizontal: 16 * scale,
    borderRadius: 22 * scale,
    borderColor: Color.colorPrimary,
    alignItems: "center",
    justifyContent: "center",
    backgroundColor: Color.colorPrimary,
  },
});
